daml/bazel_tools/haskell-turtle.patch
Moisés Ackerman 3512b5eb4d
Embed bash and zsh completion scripts into daml-assistant (#17675)
* Update optparse-applicative dep to 0.17.1.0

* Update entropy dep to 0.4.1.10

* Embed bash and zsh completion scripts into daml-assistant
2023-10-27 17:23:20 +02:00

39 lines
1.4 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 853620a..5cbafc1 100644
--- a/turtle.cabal
+++ b/turtle.cabal
@@ -81,11 +81,11 @@ Library
text >= 1.0.0 && < 1.3 ,
time < 1.13,
transformers >= 0.2.0.0 && < 0.7 ,
- optparse-applicative >= 0.16 && < 0.17,
+ optparse-applicative >= 0.16 && < 0.18,
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