getModificationTime and directory-1.2
Ganesh Sittampalam
ganesh at earth.li
Thu Sep 13 07:53:21 CEST 2012
On 12/09/2012 07:28, Simon Hengel wrote:
> On Wed, Sep 12, 2012 at 07:04:18AM +0100, Ganesh Sittampalam wrote:
>> The replacement is something like:
>>
>> t <- getModificationTime path
>> return $! fromInteger $ floor
>> $ t `diffUTCTime` UTCTime (fromGregorian 1970 1 1) 0
>
> Not sure if it makes any difference, but I use:
>
> floor . utcTimeToPOSIXSeconds <$> getModificationTime path
Thanks, that's much nicer. I missed utcTimeToPOSIXSeconds.
Since there hasn't been any support for the idea of the separate
package, I think I'll default to submitting patches for conditional
compilation to each affected project, and only make the separate
packages if the maintainers are keen.
Ganesh
More information about the Libraries
mailing list