mirror of
https://github.com/gren-lang/compiler.git
synced 2024-09-11 08:45:42 +03:00
use new package function for converting to serializable time format
This commit is contained in:
parent
f228315fa6
commit
4d00bcfef3
@ -24,6 +24,7 @@ import qualified Data.ByteString.Builder as B
|
|||||||
import qualified Data.ByteString.Lazy as LBS
|
import qualified Data.ByteString.Lazy as LBS
|
||||||
import qualified Data.Fixed as Fixed
|
import qualified Data.Fixed as Fixed
|
||||||
import qualified Data.List as List
|
import qualified Data.List as List
|
||||||
|
import qualified Data.Time.Clock as Time
|
||||||
import qualified Data.Time.Clock.POSIX as Time
|
import qualified Data.Time.Clock.POSIX as Time
|
||||||
import qualified Foreign.ForeignPtr as FPtr
|
import qualified Foreign.ForeignPtr as FPtr
|
||||||
import GHC.IO.Exception (IOException, IOErrorType(InvalidArgument))
|
import GHC.IO.Exception (IOException, IOErrorType(InvalidArgument))
|
||||||
@ -45,8 +46,7 @@ newtype Time = Time Fixed.Pico
|
|||||||
getTime :: FilePath -> IO Time
|
getTime :: FilePath -> IO Time
|
||||||
getTime path =
|
getTime path =
|
||||||
fmap
|
fmap
|
||||||
(Time . realToFrac . Time.utcTimeToPOSIXSeconds)
|
(Time . Time.nominalDiffTimeToSeconds . Time.utcTimeToPOSIXSeconds)
|
||||||
-- TODO (Time . Time.nominalDiffTimeToSeconds . Time.utcTimeToPOSIXSeconds)
|
|
||||||
(Dir.getModificationTime path)
|
(Dir.getModificationTime path)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user