[commit: packages/time] format-widths, ghc, master, tasty: SystemTime: fix for Win32 (d30f427)

git at git.haskell.org git at git.haskell.org
Fri Apr 21 16:56:33 UTC 2017


Repository : ssh://git@git.haskell.org/time

On branches: format-widths,ghc,master,tasty
Link       : http://git.haskell.org/packages/time.git/commitdiff/d30f427fbab5f001fb4339a7e87ed7cdcffd1fb5

>---------------------------------------------------------------

commit d30f427fbab5f001fb4339a7e87ed7cdcffd1fb5
Author: Ashley Yakeley <ashley at yakeley.org>
Date:   Sun Jan 15 17:41:21 2017 -0800

    SystemTime: fix for Win32


>---------------------------------------------------------------

d30f427fbab5f001fb4339a7e87ed7cdcffd1fb5
 lib/Data/Time/Clock/Internal/SystemTime.hs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/Data/Time/Clock/Internal/SystemTime.hs b/lib/Data/Time/Clock/Internal/SystemTime.hs
index 75af1fa..5826263 100644
--- a/lib/Data/Time/Clock/Internal/SystemTime.hs
+++ b/lib/Data/Time/Clock/Internal/SystemTime.hs
@@ -15,7 +15,7 @@ import Data.Time.Clock.Internal.DiffTime
 #include "HsTimeConfig.h"
 
 #ifdef mingw32_HOST_OS
-import System.Win32.Time
+import qualified System.Win32.Time as Win32
 #elif HAVE_CLOCK_GETTIME
 import Data.Time.Clock.Internal.CTimespec
 import Foreign.C.Types (CTime(..), CLong(..))
@@ -54,7 +54,7 @@ getTAISystemTime :: Maybe (DiffTime,IO SystemTime)
 -- time by adjusting the offset to be relative to the POSIX epoch.
 
 getSystemTime = do
-    FILETIME ft <- System.Win32.Time.getSystemTimeAsFileTime
+    Win32.FILETIME ft <- Win32.getSystemTimeAsFileTime
     let (s, us) = (ft - win32_epoch_adjust) `divMod` 10000000
     return (MkSystemTime (fromIntegral s) (fromIntegral us * 1000))
   where



More information about the ghc-commits mailing list