daml/bazel_tools/haskell-turtle.patch
Moisés Ackerman e4764cc426
Upgrade to GHC 9.0.2 (#12300)
changelog_begin
changelog_end

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2022-02-01 11:27:11 +01:00

34 lines
1.2 KiB
Diff

diff --git a/src/Turtle/Prelude.hs b/src/Turtle/Prelude.hs
index 384fcb4..0e8d6b2 100644
--- a/src/Turtle/Prelude.hs
+++ b/src/Turtle/Prelude.hs
@@ -1237,10 +1237,14 @@ touch file = do
Nothing
(creationTime, _, _) <- Win32.getFileTime handle
systemTime <- Win32.getSystemTimeAsFileTime
+#if MIN_VERSION_Win32(2,12,0)
+ Win32.setFileTime handle (Just creationTime) (Just systemTime) (Just systemTime)
+#else
Win32.setFileTime handle creationTime systemTime systemTime
+#endif -- MIN_VERSION_Win32
#else
then touchFile (Filesystem.encodeString file)
-#endif
+#endif -- mingw32_HOST_OS
else output file empty )
{-| This type is the same as @"System.Directory".`System.Directory.Permissions`@
diff --git a/turtle.cabal b/turtle.cabal
index 14af73d..6691e91 100644
--- a/turtle.cabal
+++ b/turtle.cabal
@@ -85,7 +85,7 @@ Library
optional-args >= 1.0 && < 2.0 ,
unix-compat >= 0.4 && < 0.6
if os(windows)
- Build-Depends: Win32 >= 2.2.0.1 && < 2.9
+ Build-Depends: Win32 >= 2.2.0.1 && < 2.13
else
Build-Depends: unix >= 2.5.1.0 && < 2.8