diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2023-02-02 16:01:56 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2023-02-06 09:43:21 -0500 |
commit | 6636b670233522f01d002c9b97827d00289dbf5c (patch) | |
tree | ccfd2ae729261fdb52e97dec8629a875b58e4512 /libraries/base | |
parent | b18fbf52f98d0128c52b3a90ddca727a6d5d4d45 (diff) | |
download | haskell-6636b670233522f01d002c9b97827d00289dbf5c.tar.gz |
JS: replace "js" architecture with "javascript"
Despite Cabal supporting any architecture name, `cabal --check` only
supports a few built-in ones. Sadly `cabal --check` is used by Hackage
hence using any non built-in name in a package (e.g. `arch(js)`) is
rejected and the package is prevented from being uploaded on Hackage.
Luckily built-in support for the `javascript` architecture was added for
GHCJS a while ago. In order to allow newer `base` to be uploaded on
Hackage we make the switch from `js` to `javascript` architecture.
Fixes #22740.
Co-authored-by: Ben Gamari <ben@smart-cactus.org>
Diffstat (limited to 'libraries/base')
-rw-r--r-- | libraries/base/Control/Concurrent.hs | 2 | ||||
-rw-r--r-- | libraries/base/GHC/Conc/IO.hs | 22 | ||||
-rw-r--r-- | libraries/base/GHC/Conc/Windows.hs | 2 | ||||
-rw-r--r-- | libraries/base/GHC/Event.hs | 2 | ||||
-rw-r--r-- | libraries/base/GHC/Event/Thread.hs | 2 | ||||
-rw-r--r-- | libraries/base/GHC/Event/TimerManager.hs | 2 | ||||
-rw-r--r-- | libraries/base/GHC/IO/Encoding.hs | 2 | ||||
-rw-r--r-- | libraries/base/GHC/IO/Encoding/CodePage/API.hs | 2 | ||||
-rw-r--r-- | libraries/base/GHC/IO/FD.hs | 14 | ||||
-rw-r--r-- | libraries/base/GHC/JS/Prim.hs | 6 | ||||
-rw-r--r-- | libraries/base/GHC/JS/Prim/Internal/Build.hs | 2 | ||||
-rw-r--r-- | libraries/base/GHC/Stack/CCS.hsc | 2 | ||||
-rw-r--r-- | libraries/base/GHC/TopHandler.hs | 8 | ||||
-rw-r--r-- | libraries/base/GHC/Windows.hs | 2 | ||||
-rw-r--r-- | libraries/base/System/CPUTime.hsc | 2 | ||||
-rw-r--r-- | libraries/base/System/Environment.hs | 2 | ||||
-rw-r--r-- | libraries/base/System/Environment/ExecutablePath.hsc | 4 | ||||
-rw-r--r-- | libraries/base/System/Posix/Internals.hs | 10 | ||||
-rw-r--r-- | libraries/base/System/Timeout.hs | 4 | ||||
-rw-r--r-- | libraries/base/base.cabal | 8 |
20 files changed, 50 insertions, 50 deletions
diff --git a/libraries/base/Control/Concurrent.hs b/libraries/base/Control/Concurrent.hs index 87ddc9584a..50166d27f7 100644 --- a/libraries/base/Control/Concurrent.hs +++ b/libraries/base/Control/Concurrent.hs @@ -106,7 +106,7 @@ module Control.Concurrent ( ) where -- JavaScript platform doesn't support bound threads -#if !defined(js_HOST_ARCH) +#if !defined(javascript_HOST_ARCH) #define SUPPORT_BOUND_THREADS #endif diff --git a/libraries/base/GHC/Conc/IO.hs b/libraries/base/GHC/Conc/IO.hs index 869847e77a..4f7795e369 100644 --- a/libraries/base/GHC/Conc/IO.hs +++ b/libraries/base/GHC/Conc/IO.hs @@ -65,12 +65,12 @@ import GHC.IO.SubSystem import GHC.Conc.Windows (asyncRead, asyncWrite, asyncDoProc, asyncReadBA, asyncWriteBA, ConsoleEvent(..), win32ConsoleHandler, toWin32ConsoleEvent) -#elif !defined(js_HOST_ARCH) +#elif !defined(javascript_HOST_ARCH) import qualified GHC.Event.Thread as Event #endif ensureIOManagerIsRunning :: IO () -#if defined(js_HOST_ARCH) +#if defined(javascript_HOST_ARCH) ensureIOManagerIsRunning = pure () #elif !defined(mingw32_HOST_OS) ensureIOManagerIsRunning = Event.ensureIOManagerIsRunning @@ -91,7 +91,7 @@ interruptIOManager = Windows.interruptIOManager #endif ioManagerCapabilitiesChanged :: IO () -#if !defined(mingw32_HOST_OS) && !defined(js_HOST_ARCH) +#if !defined(mingw32_HOST_OS) && !defined(javascript_HOST_ARCH) ioManagerCapabilitiesChanged = Event.ioManagerCapabilitiesChanged #else ioManagerCapabilitiesChanged = return () @@ -105,7 +105,7 @@ ioManagerCapabilitiesChanged = return () -- that has been used with 'threadWaitRead', use 'closeFdWith'. threadWaitRead :: Fd -> IO () threadWaitRead fd -#if !defined(mingw32_HOST_OS) && !defined(js_HOST_ARCH) +#if !defined(mingw32_HOST_OS) && !defined(javascript_HOST_ARCH) | threaded = Event.threadWaitRead fd #endif | otherwise = IO $ \s -> @@ -121,7 +121,7 @@ threadWaitRead fd -- that has been used with 'threadWaitWrite', use 'closeFdWith'. threadWaitWrite :: Fd -> IO () threadWaitWrite fd -#if !defined(mingw32_HOST_OS) && !defined(js_HOST_ARCH) +#if !defined(mingw32_HOST_OS) && !defined(javascript_HOST_ARCH) | threaded = Event.threadWaitWrite fd #endif | otherwise = IO $ \s -> @@ -135,7 +135,7 @@ threadWaitWrite fd -- in the file descriptor. threadWaitReadSTM :: Fd -> IO (Sync.STM (), IO ()) threadWaitReadSTM fd -#if !defined(mingw32_HOST_OS) && !defined(js_HOST_ARCH) +#if !defined(mingw32_HOST_OS) && !defined(javascript_HOST_ARCH) | threaded = Event.threadWaitReadSTM fd #endif | otherwise = do @@ -154,7 +154,7 @@ threadWaitReadSTM fd -- in the file descriptor. threadWaitWriteSTM :: Fd -> IO (Sync.STM (), IO ()) threadWaitWriteSTM fd -#if !defined(mingw32_HOST_OS) && !defined(js_HOST_ARCH) +#if !defined(mingw32_HOST_OS) && !defined(javascript_HOST_ARCH) | threaded = Event.threadWaitWriteSTM fd #endif | otherwise = do @@ -179,7 +179,7 @@ closeFdWith :: (Fd -> IO ()) -- ^ Low-level action that performs the real close. -> Fd -- ^ File descriptor to close. -> IO () closeFdWith close fd -#if !defined(mingw32_HOST_OS) && !defined(js_HOST_ARCH) +#if !defined(mingw32_HOST_OS) && !defined(javascript_HOST_ARCH) | threaded = Event.closeFdWith close fd #endif | otherwise = close fd @@ -199,7 +199,7 @@ threadDelay time #if defined(mingw32_HOST_OS) | isWindowsNativeIO = Windows.threadDelay time | threaded = Windows.threadDelay time -#elif !defined(js_HOST_ARCH) +#elif !defined(javascript_HOST_ARCH) | threaded = Event.threadDelay time #endif | otherwise = IO $ \s -> @@ -219,11 +219,11 @@ registerDelay _usecs #if defined(mingw32_HOST_OS) | isWindowsNativeIO = Windows.registerDelay _usecs | threaded = Windows.registerDelay _usecs -#elif !defined(js_HOST_ARCH) +#elif !defined(javascript_HOST_ARCH) | threaded = Event.registerDelay _usecs #endif | otherwise = errorWithoutStackTrace "registerDelay: requires -threaded" -#if !defined(js_HOST_ARCH) +#if !defined(javascript_HOST_ARCH) foreign import ccall unsafe "rtsSupportsBoundThreads" threaded :: Bool #endif diff --git a/libraries/base/GHC/Conc/Windows.hs b/libraries/base/GHC/Conc/Windows.hs index e9733806e7..b22307e1f2 100644 --- a/libraries/base/GHC/Conc/Windows.hs +++ b/libraries/base/GHC/Conc/Windows.hs @@ -19,7 +19,7 @@ -- #not-home module GHC.Conc.Windows -#if defined(js_HOST_ARCH) +#if defined(javascript_HOST_ARCH) () where #else ( ensureIOManagerIsRunning diff --git a/libraries/base/GHC/Event.hs b/libraries/base/GHC/Event.hs index a9acda5516..5a98a9aeda 100644 --- a/libraries/base/GHC/Event.hs +++ b/libraries/base/GHC/Event.hs @@ -11,7 +11,7 @@ -- ---------------------------------------------------------------------------- module GHC.Event -#if defined(js_HOST_ARCH) +#if defined(javascript_HOST_ARCH) ( ) where #else ( -- * Types diff --git a/libraries/base/GHC/Event/Thread.hs b/libraries/base/GHC/Event/Thread.hs index f76e9147da..1018edc253 100644 --- a/libraries/base/GHC/Event/Thread.hs +++ b/libraries/base/GHC/Event/Thread.hs @@ -5,7 +5,7 @@ #include <ghcplatform.h> module GHC.Event.Thread -#if defined(js_HOST_ARCH) +#if defined(javascript_HOST_ARCH) ( ) where #else ( getSystemEventManager diff --git a/libraries/base/GHC/Event/TimerManager.hs b/libraries/base/GHC/Event/TimerManager.hs index bb26741d58..b334924a9d 100644 --- a/libraries/base/GHC/Event/TimerManager.hs +++ b/libraries/base/GHC/Event/TimerManager.hs @@ -7,7 +7,7 @@ -- TODO: use the new Windows IO manager module GHC.Event.TimerManager -#if defined(js_HOST_ARCH) +#if defined(javascript_HOST_ARCH) () where #else ( -- * Types diff --git a/libraries/base/GHC/IO/Encoding.hs b/libraries/base/GHC/IO/Encoding.hs index ea738c56a4..4759356f4c 100644 --- a/libraries/base/GHC/IO/Encoding.hs +++ b/libraries/base/GHC/IO/Encoding.hs @@ -180,7 +180,7 @@ initLocaleEncoding, initFileSystemEncoding, initForeignEncoding :: TextEncoding -- N.B. initLocaleEncoding is exported for use in System.IO.localeEncoding. -- NOINLINE ensures that this result is shared. -#if defined(js_HOST_ARCH) +#if defined(javascript_HOST_ARCH) initLocaleEncoding = utf8 initFileSystemEncoding = utf8 initForeignEncoding = utf8 diff --git a/libraries/base/GHC/IO/Encoding/CodePage/API.hs b/libraries/base/GHC/IO/Encoding/CodePage/API.hs index ef6bebd002..6136156cdb 100644 --- a/libraries/base/GHC/IO/Encoding/CodePage/API.hs +++ b/libraries/base/GHC/IO/Encoding/CodePage/API.hs @@ -32,7 +32,7 @@ import GHC.ForeignPtr (castForeignPtr) import System.Posix.Internals -#if defined(js_HOST_ARCH) +#if defined(javascript_HOST_ARCH) mkCodePageEncoding :: String mkCodePageEncoding = "" #else diff --git a/libraries/base/GHC/IO/FD.hs b/libraries/base/GHC/IO/FD.hs index 2886658a5c..2d4b92fa4f 100644 --- a/libraries/base/GHC/IO/FD.hs +++ b/libraries/base/GHC/IO/FD.hs @@ -570,7 +570,7 @@ indicates that there's no data, we call threadWaitRead. readRawBufferPtr :: String -> FD -> Ptr Word8 -> Int -> CSize -> IO Int readRawBufferPtr loc !fd !buf !off !len -#if defined(js_HOST_ARCH) +#if defined(javascript_HOST_ARCH) = fmap fromIntegral . uninterruptibleMask_ $ throwErrnoIfMinus1 loc (c_read (fdFD fd) (buf `plusPtr` off) len) #else @@ -592,7 +592,7 @@ readRawBufferPtr loc !fd !buf !off !len -- return: -1 indicates EOF, >=0 is bytes read readRawBufferPtrNoBlock :: String -> FD -> Ptr Word8 -> Int -> CSize -> IO Int readRawBufferPtrNoBlock loc !fd !buf !off !len -#if defined(js_HOST_ARCH) +#if defined(javascript_HOST_ARCH) = uninterruptibleMask_ $ do r <- throwErrnoIfMinus1 loc (c_read (fdFD fd) (buf `plusPtr` off) len) case r of @@ -617,7 +617,7 @@ readRawBufferPtrNoBlock loc !fd !buf !off !len writeRawBufferPtr :: String -> FD -> Ptr Word8 -> Int -> CSize -> IO CInt writeRawBufferPtr loc !fd !buf !off !len -#if defined(js_HOST_ARCH) +#if defined(javascript_HOST_ARCH) = fmap fromIntegral . uninterruptibleMask_ $ throwErrnoIfMinus1 loc (c_write (fdFD fd) (buf `plusPtr` off) len) #else @@ -637,7 +637,7 @@ writeRawBufferPtr loc !fd !buf !off !len writeRawBufferPtrNoBlock :: String -> FD -> Ptr Word8 -> Int -> CSize -> IO CInt writeRawBufferPtrNoBlock loc !fd !buf !off !len -#if defined(js_HOST_ARCH) +#if defined(javascript_HOST_ARCH) = uninterruptibleMask_ $ do r <- throwErrnoIfMinus1 loc (c_write (fdFD fd) (buf `plusPtr` off) len) case r of @@ -658,7 +658,7 @@ writeRawBufferPtrNoBlock loc !fd !buf !off !len safe_write = do_write (c_safe_write (fdFD fd) (buf `plusPtr` off) len) #endif -#if !defined(js_HOST_ARCH) +#if !defined(javascript_HOST_ARCH) isNonBlocking :: FD -> Bool isNonBlocking fd = fdIsNonBlocking fd /= 0 @@ -754,14 +754,14 @@ foreign import WINDOWS_CCONV safe "send" #endif -#if !defined(js_HOST_ARCH) +#if !defined(javascript_HOST_ARCH) foreign import ccall unsafe "rtsSupportsBoundThreads" threaded :: Bool #endif -- ----------------------------------------------------------------------------- -- utils -#if !defined(mingw32_HOST_OS) && !defined(js_HOST_ARCH) +#if !defined(mingw32_HOST_OS) && !defined(javascript_HOST_ARCH) throwErrnoIfMinus1RetryOnBlock :: String -> IO CSsize -> IO CSsize -> IO CSsize throwErrnoIfMinus1RetryOnBlock loc f on_block = do diff --git a/libraries/base/GHC/JS/Prim.hs b/libraries/base/GHC/JS/Prim.hs index 4a9505cbdf..955cadf328 100644 --- a/libraries/base/GHC/JS/Prim.hs +++ b/libraries/base/GHC/JS/Prim.hs @@ -10,7 +10,7 @@ module GHC.JS.Prim ( JSVal(..), JSVal# , JSException(..) , WouldBlockException(..) -#if defined(js_HOST_ARCH) +#if defined(javascript_HOST_ARCH) , toIO , resolve , resolveIO @@ -54,7 +54,7 @@ import GHC.IO argument or result. -} -#if defined(js_HOST_ARCH) +#if defined(javascript_HOST_ARCH) data JSVal = JSVal ByteArray# type JSVal# = ByteArray# #else @@ -75,7 +75,7 @@ instance Ex.Exception JSException instance Show JSException where show (JSException _ xs) = "JavaScript exception: " ++ xs -#if defined(js_HOST_ARCH) +#if defined(javascript_HOST_ARCH) {-# NOINLINE toIO #-} toIO :: Exts.Any -> IO Exts.Any diff --git a/libraries/base/GHC/JS/Prim/Internal/Build.hs b/libraries/base/GHC/JS/Prim/Internal/Build.hs index 78203cd787..18a5c76441 100644 --- a/libraries/base/GHC/JS/Prim/Internal/Build.hs +++ b/libraries/base/GHC/JS/Prim/Internal/Build.hs @@ -1,7 +1,7 @@ -- helpers for constructing JS objects that can be efficiently inlined as literals -- no Template Haskell available yet, generated by utils/genBuildObject.hs {-# LANGUAGE CPP #-} -#if !defined(js_HOST_ARCH) +#if !defined(javascript_HOST_ARCH) module GHC.JS.Prim.Internal.Build () where #else {-# LANGUAGE ForeignFunctionInterface, JavaScriptFFI, GHCForeignImportPrim #-} diff --git a/libraries/base/GHC/Stack/CCS.hsc b/libraries/base/GHC/Stack/CCS.hsc index b6d3f83b94..274202efd6 100644 --- a/libraries/base/GHC/Stack/CCS.hsc +++ b/libraries/base/GHC/Stack/CCS.hsc @@ -76,7 +76,7 @@ clearCCS :: IO a -> IO a clearCCS (IO m) = IO $ \s -> clearCCS## m s -- | Get the 'CostCentre' at the head of a 'CostCentreStack'. -#if defined(js_HOST_ARCH) +#if defined(javascript_HOST_ARCH) ccsCC :: Ptr CostCentreStack -> IO (Ptr CostCentre) ccsCC p = peekByteOff p 4 diff --git a/libraries/base/GHC/TopHandler.hs b/libraries/base/GHC/TopHandler.hs index 153b5170d7..04045dad05 100644 --- a/libraries/base/GHC/TopHandler.hs +++ b/libraries/base/GHC/TopHandler.hs @@ -47,7 +47,7 @@ import GHC.Weak #if defined(mingw32_HOST_OS) import GHC.ConsoleHandler -#elif defined(js_HOST_ARCH) +#elif defined(javascript_HOST_ARCH) #else import Data.Dynamic (toDyn) #endif @@ -95,7 +95,7 @@ runMainIO main = topHandler install_interrupt_handler :: IO () -> IO () -#if defined(js_HOST_ARCH) +#if defined(javascript_HOST_ARCH) install_interrupt_handler _ = return () #elif defined(mingw32_HOST_OS) install_interrupt_handler handler = do @@ -269,7 +269,7 @@ unreachable :: IO a unreachable = failIO "If you can read this, shutdownHaskellAndExit did not exit." exitHelper :: CInt -> Int -> IO a -#if defined(mingw32_HOST_OS) || defined(js_HOST_ARCH) +#if defined(mingw32_HOST_OS) || defined(javascript_HOST_ARCH) exitHelper exitKind r = shutdownHaskellAndExit (fromIntegral r) exitKind >> unreachable #else @@ -297,7 +297,7 @@ foreign import ccall "shutdownHaskellAndSignal" exitInterrupted :: IO a exitInterrupted = -#if defined(mingw32_HOST_OS) || defined(js_HOST_ARCH) +#if defined(mingw32_HOST_OS) || defined(javascript_HOST_ARCH) safeExit 252 #elif !defined(HAVE_SIGNAL_H) safeExit 1 diff --git a/libraries/base/GHC/Windows.hs b/libraries/base/GHC/Windows.hs index 85faa25e43..f007d90453 100644 --- a/libraries/base/GHC/Windows.hs +++ b/libraries/base/GHC/Windows.hs @@ -21,7 +21,7 @@ ----------------------------------------------------------------------------- module GHC.Windows ( -#if defined(js_HOST_ARCH) +#if defined(javascript_HOST_ARCH) ) where #else diff --git a/libraries/base/System/CPUTime.hsc b/libraries/base/System/CPUTime.hsc index 19d21e2135..c98c5ddaf6 100644 --- a/libraries/base/System/CPUTime.hsc +++ b/libraries/base/System/CPUTime.hsc @@ -34,7 +34,7 @@ import System.IO.Unsafe (unsafePerformIO) #if defined(mingw32_HOST_OS) import qualified System.CPUTime.Windows as I -#elif defined(js_HOST_ARCH) +#elif defined(javascript_HOST_ARCH) import qualified System.CPUTime.Javascript as I #elif _POSIX_TIMERS > 0 && defined(_POSIX_CPUTIME) && _POSIX_CPUTIME >= 0 diff --git a/libraries/base/System/Environment.hs b/libraries/base/System/Environment.hs index c5e5d6d039..771b490196 100644 --- a/libraries/base/System/Environment.hs +++ b/libraries/base/System/Environment.hs @@ -19,7 +19,7 @@ module System.Environment ( getArgs, getProgName, -#if !defined(js_HOST_ARCH) +#if !defined(javascript_HOST_ARCH) executablePath, #endif getExecutablePath, diff --git a/libraries/base/System/Environment/ExecutablePath.hsc b/libraries/base/System/Environment/ExecutablePath.hsc index ede63d5e6d..cb9fad7a7e 100644 --- a/libraries/base/System/Environment/ExecutablePath.hsc +++ b/libraries/base/System/Environment/ExecutablePath.hsc @@ -18,12 +18,12 @@ module System.Environment.ExecutablePath ( getExecutablePath -##if !defined(js_HOST_ARCH) +##if !defined(javascript_HOST_ARCH) , executablePath ##endif ) where -##if defined(js_HOST_ARCH) +##if defined(javascript_HOST_ARCH) getExecutablePath :: IO FilePath getExecutablePath = return "a.jsexe" diff --git a/libraries/base/System/Posix/Internals.hs b/libraries/base/System/Posix/Internals.hs index 4a82bbae1c..89fa80672f 100644 --- a/libraries/base/System/Posix/Internals.hs +++ b/libraries/base/System/Posix/Internals.hs @@ -429,7 +429,7 @@ c_safe_open filepath oflags mode = hostIsThreaded :: Bool hostIsThreaded = rtsIsThreaded_ /= 0 -#if !defined(js_HOST_ARCH) +#if !defined(javascript_HOST_ARCH) foreign import ccall unsafe "HsBase.h __hscore_open" c_open :: CFilePath -> CInt -> CMode -> IO CInt @@ -454,7 +454,7 @@ foreign import ccall unsafe "HsBase.h __hscore_lstat" lstat :: CFilePath -> Ptr CStat -> IO CInt #endif -#if defined(js_HOST_ARCH) +#if defined(javascript_HOST_ARCH) foreign import javascript unsafe "(() => { return rts_isThreaded; })" rtsIsThreaded_ :: Int foreign import javascript interruptible "(($1_1, $2_2, $2, $c) => { return h$base_access($1_1,$2_2,$2,$c); })" @@ -743,7 +743,7 @@ foreign import ccall unsafe "HsBase.h getpid" #endif #endif -#if !defined(js_HOST_ARCH) +#if !defined(javascript_HOST_ARCH) foreign import ccall unsafe "HsBase.h __hscore_stat" c_stat :: CFilePath -> Ptr CStat -> IO CInt @@ -751,7 +751,7 @@ foreign import ccall unsafe "HsBase.h __hscore_ftruncate" c_ftruncate :: CInt -> COff -> IO CInt #endif -#if !defined(mingw32_HOST_OS) && !defined(js_HOST_ARCH) +#if !defined(mingw32_HOST_OS) && !defined(javascript_HOST_ARCH) foreign import capi unsafe "HsBase.h fcntl" c_fcntl_read :: CInt -> CInt -> IO CInt @@ -822,7 +822,7 @@ c_waitpid _ _ _ = ioError (ioeSetLocation unsupportedOperation "waitpid") #endif -#if !defined(js_HOST_ARCH) +#if !defined(javascript_HOST_ARCH) -- POSIX flags only: foreign import ccall unsafe "HsBase.h __hscore_o_rdonly" o_RDONLY :: CInt foreign import ccall unsafe "HsBase.h __hscore_o_wronly" o_WRONLY :: CInt diff --git a/libraries/base/System/Timeout.hs b/libraries/base/System/Timeout.hs index bf215c747a..60908066d4 100644 --- a/libraries/base/System/Timeout.hs +++ b/libraries/base/System/Timeout.hs @@ -17,7 +17,7 @@ -- TODO: Inspect is still suitable. module System.Timeout ( Timeout, timeout ) where -#if !defined(mingw32_HOST_OS) && !defined(js_HOST_ARCH) +#if !defined(mingw32_HOST_OS) && !defined(javascript_HOST_ARCH) import Control.Monad import GHC.Event (getSystemTimerManager, registerTimeout, unregisterTimeout) @@ -99,7 +99,7 @@ timeout :: Int -> IO a -> IO (Maybe a) timeout n f | n < 0 = fmap Just f | n == 0 = return Nothing -#if !defined(mingw32_HOST_OS) && !defined(js_HOST_ARCH) +#if !defined(mingw32_HOST_OS) && !defined(javascript_HOST_ARCH) | rtsSupportsBoundThreads = do -- In the threaded RTS, we use the Timer Manager to delay the -- (fairly expensive) 'forkIO' call until the timeout has expired. diff --git a/libraries/base/base.cabal b/libraries/base/base.cabal index 5e7fdc17c6..5436c10c14 100644 --- a/libraries/base/base.cabal +++ b/libraries/base/base.cabal @@ -362,7 +362,7 @@ Library System.Environment.ExecutablePath System.CPUTime.Utils - if !arch(js) + if !arch(javascript) c-sources: cbits/DarwinUtils.c cbits/PrelIOUtils.c @@ -378,7 +378,7 @@ Library cbits/CastFloatWord.cmm cbits/StackCloningDecoding.cmm - if arch(js) + if arch(javascript) js-sources: -- "platform" must be linked first because it defines global constants -- (e.g. h$isNode) @@ -460,7 +460,7 @@ Library System.CPUTime.Posix.RUsage System.CPUTime.Unsupported - if arch(js) + if arch(javascript) other-modules: System.CPUTime.Javascript @@ -470,7 +470,7 @@ Library if os(freebsd) cc-options: -DLIBICONV_PLUG - if arch(js) + if arch(javascript) exposed-modules: GHC.JS.Prim GHC.JS.Prim.Internal |