[Git][ghc/ghc][wip/ghc-internals-move] Windows fixes

Ben Gamari (@bgamari) gitlab at gitlab.haskell.org
Tue Jan 30 04:25:50 UTC 2024



Ben Gamari pushed to branch wip/ghc-internals-move at Glasgow Haskell Compiler / GHC


Commits:
78227ad0 by Ben Gamari at 2024-01-29T23:22:43-08:00
Windows fixes

- - - - -


7 changed files:

- libraries/ghc-internal/src/GHC/Conc/POSIX/Const.hsc
- libraries/ghc-internal/src/GHC/Event/Windows.hsc
- libraries/ghc-internal/src/GHC/Windows.hs
- libraries/ghc-internal/src/System/Environment.hs
- libraries/ghc-internal/src/System/Environment/Blank.hsc
- libraries/ghc-internal/src/System/Environment/ExecutablePath.hsc
- rts/TraverseHeap.c


Changes:

=====================================
libraries/ghc-internal/src/GHC/Conc/POSIX/Const.hsc
=====================================
@@ -1,4 +1,4 @@
-{-# LANGUAGE Trustworthy #-}
+{-# LANGUAGE Safe #-}
 {-# LANGUAGE NoImplicitPrelude #-}
 {-# OPTIONS_HADDOCK not-home #-}
 


=====================================
libraries/ghc-internal/src/GHC/Event/Windows.hsc
=====================================
@@ -80,7 +80,6 @@ module GHC.Event.Windows (
 
 -- There doesn't seem to be  GHC.* import for these
 import Control.Concurrent.MVar (modifyMVar)
-import GHC.Conc.Bound (forkOS)
 import Data.Semigroup.Internal (stimesMonoid)
 import Data.Foldable (mapM_, length, forM_)
 import Data.Maybe (isJust, maybe)


=====================================
libraries/ghc-internal/src/GHC/Windows.hs
=====================================
@@ -79,7 +79,7 @@ module GHC.Windows (
     ) where
 
 import Data.Bits (finiteBitSize, shiftL, shiftR, (.|.), (.&.))
-import GHC.Char
+import GHC.Unicode (isSpace)
 import Data.OldList
 import Data.Maybe
 import Data.Word


=====================================
libraries/ghc-internal/src/System/Environment.hs
=====================================
@@ -46,6 +46,7 @@ import GHC.IO (FilePath)
 import GHC.IO.Exception
 import qualified GHC.Foreign as GHC
 #if defined(mingw32_HOST_OS)
+import Control.Monad (unless)
 import GHC.IO.Encoding (argvEncoding)
 import GHC.Windows
 #else


=====================================
libraries/ghc-internal/src/System/Environment/Blank.hsc
=====================================
@@ -43,13 +43,14 @@ import Data.Functor
 import Data.List (elem, null, takeWhile)
 import Foreign.C
 import GHC.Base
-import GHC.Enum
-import GHC.Real (fromIntegral)
 #if defined(mingw32_HOST_OS)
 import Foreign.Ptr
 import GHC.Windows
 import Control.Monad
+import Data.List (lookup)
 #else
+import GHC.Real (fromIntegral)
+import GHC.Enum
 import System.Posix.Internals
 #endif
 import GHC.IO.Exception


=====================================
libraries/ghc-internal/src/System/Environment/ExecutablePath.hsc
=====================================
@@ -73,12 +73,14 @@ import System.Posix.Internals
 #include <sys/sysctl.h>
 #elif defined(mingw32_HOST_OS)
 import Control.Exception
+import Control.Monad.Fail
 import Data.Functor
-import Data.List (isPrefixOf)
+import Data.List (isPrefixOf, drop)
 import Data.Word
 import Foreign.C
 import Foreign.Marshal.Array
 import Foreign.Ptr
+import GHC.Num
 import GHC.Windows
 #include <windows.h>
 #include <stdint.h>


=====================================
rts/TraverseHeap.c
=====================================
@@ -9,10 +9,10 @@
 
 #if defined(PROFILING)
 
-#include <string.h>
 #include "rts/PosixSource.h"
 #include "Rts.h"
 #include "sm/Storage.h"
+#include <string.h>
 
 #include "TraverseHeap.h"
 



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/78227ad055d1eaa7e76c1ce6d893bc48a95d1d7c

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/78227ad055d1eaa7e76c1ce6d893bc48a95d1d7c
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240129/5c75fe92/attachment-0001.html>


More information about the ghc-commits mailing list