Skip to content

Instantly share code, notes, and snippets.

@mpickering
Created October 2, 2025 11:10
Show Gist options
  • Select an option

  • Save mpickering/de226e4549e1cc04dc4420a6d23d5982 to your computer and use it in GitHub Desktop.

Select an option

Save mpickering/de226e4549e1cc04dc4420a6d23d5982 to your computer and use it in GitHub Desktop.
#!/usr/bin/env -S cabal run
{- cabal:
build-depends: base >=4.17 && <5
, directory >=1.3.8
, filepath >=1.4.100
, time
, criterion >=1.6
default-language: GHC2021
ghc-options: -O2
-}
import System.OsPath
import System.Directory.OsPath (getModificationTime)
import Control.Monad
main :: IO ()
main = do
let path :: OsPath
path = unsafeEncodeUtf "/home/matt/ghc-clean/cabal.project-reinstall"
rel_path = unsafeEncodeUtf "cabal.project-reinstall"
replicateM_ 1000000 (getModificationTime path)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment