Preprocessing library for system-fileio-0.3.16.5..
Building library for system-fileio-0.3.16.5..
[1 of 1] Compiling Filesystem ( lib\Filesystem.hs, dist\build\Filesystem.o )
lib\Filesystem.hs:720:5: error:
Error: parse error (possibly incorrect indentation or mismatched brackets)
|
| (toInteger (Win32.wHour stime) * 3600) +
| ^
This happens regardless of ghc version (tested: 8.4 up to 9.10).
Here is a patch that fixes the problem:
--- a/system-fileio/lib/Filesystem.hs
+++ b/system-fileio/lib/Filesystem.hs
@@ -711,18 +711,21 @@ getModified path = do
let ftime = Win32.bhfiLastWriteTime info
stime <- Win32.fileTimeToSystemTime ftime
- let date = fromGregorian
- (fromIntegral (Win32.wYear stime))
- (fromIntegral (Win32.wMonth stime))
- (fromIntegral (Win32.wDay stime))
-
- let seconds = secondsToDiffTime $
- (toInteger (Win32.wHour stime) * 3600) +
- (toInteger (Win32.wMinute stime) * 60) +
- (toInteger (Win32.wSecond stime))
-
- let msecs = picosecondsToDiffTime $
- (toInteger (Win32.wMilliseconds stime) * 1000000000)
+ let date =
+ fromGregorian
+ (fromIntegral (Win32.wYear stime))
+ (fromIntegral (Win32.wMonth stime))
+ (fromIntegral (Win32.wDay stime))
+
+ let seconds =
+ secondsToDiffTime $
+ (toInteger (Win32.wHour stime) * 3600) +
+ (toInteger (Win32.wMinute stime) * 60) +
+ (toInteger (Win32.wSecond stime))
+
+ let msecs =
+ picosecondsToDiffTime $
+ (toInteger (Win32.wMilliseconds stime) * 1000000000)
return (UTCTime date (seconds + msecs))
#else
This happens regardless of ghc version (tested: 8.4 up to 9.10).
Here is a patch that fixes the problem: