Created
February 14, 2013 08:20
-
-
Save zsol/4951308 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{- | |
you need the memoize cabal package to use this. | |
http://hackage.haskell.org/package/memoize-0.3 | |
-} | |
import System.IO.Unsafe | |
import System.Posix.Files | |
import System.Posix.Types | |
import Data.Function.Memoize | |
import Debug.Trace | |
mtime' :: String -> EpochTime | |
mtime' = (trace "now executing") . modificationTime . unsafePerformIO . getFileStatus | |
mtime = memoize mtime' |
Author
zsol
commented
Feb 14, 2013
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment