Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tag: v0.1.0
Fetching contributors…

Cannot retrieve contributors at this time

35 lines (27 sloc) 0.838 kb
#!/usr/bin/env runhaskell
import Distribution.Simple
import Distribution.PackageDescription
import Control.Monad
import System.Directory
import FindBench
import FindConfig
main = defaultMainWithHooks simpleUserHooks {
preConf = createConfDir
, postConf = writeLocalConf
, postClean = deleteLocalConf}
createConfDir _ _ = do
e <- doesDirectoryExist configDir
unless e (createDirectory configDir)
return emptyHookedBuildInfo
writeLocalConf _ _ _ _ = do
findLocalConfigs configDir
findLocalBenchmarks benchmarkDir
deleteLocalConf _ _ _ _ = do
deleteIfExists (localConfigsFileName configDir)
deleteIfExists :: FilePath -> IO ()
deleteIfExists f = do
e <- doesFileExist f
when e (removeFile f)
configDir, benchmarkDir :: FilePath
configDir = "config"
benchmarkDir = "benchmarks"
Jump to Line
Something went wrong with that request. Please try again.